package com.ruoyi.farmer.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 农作物管理
 * @author 王泽超的电脑
 * @TableName trace_user_crops
 */
@TableName(value ="trace_user_crops")
@Data
public class TraceUserCrops implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 登录人名称
     */
    private String username;

    /**
     * 作物id
     */
    private String cropsId;

    /**
     * 作物名称
     */
    private String cropsName;

    /**
     * (0,种植中，1，已出售)
     */
    private Integer status;

    /**
     * 0 未加工 1加工中 2加工完成
     */
    private Integer machingStatus;

    /**
     * 0 未出库 1已出库
     */
    private Integer outFactoryStatus;

    /**
     * 0 未填写 1已填写
     */
    private Integer productWriteStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TraceUserCrops other = (TraceUserCrops) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getCropsId() == null ? other.getCropsId() == null : this.getCropsId().equals(other.getCropsId()))
            && (this.getCropsName() == null ? other.getCropsName() == null : this.getCropsName().equals(other.getCropsName()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getMachingStatus() == null ? other.getMachingStatus() == null : this.getMachingStatus().equals(other.getMachingStatus()))
            && (this.getOutFactoryStatus() == null ? other.getOutFactoryStatus() == null : this.getOutFactoryStatus().equals(other.getOutFactoryStatus()))
            && (this.getProductWriteStatus() == null ? other.getProductWriteStatus() == null : this.getProductWriteStatus().equals(other.getProductWriteStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getCropsId() == null) ? 0 : getCropsId().hashCode());
        result = prime * result + ((getCropsName() == null) ? 0 : getCropsName().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getMachingStatus() == null) ? 0 : getMachingStatus().hashCode());
        result = prime * result + ((getOutFactoryStatus() == null) ? 0 : getOutFactoryStatus().hashCode());
        result = prime * result + ((getProductWriteStatus() == null) ? 0 : getProductWriteStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", cropsId=").append(cropsId);
        sb.append(", cropsName=").append(cropsName);
        sb.append(", status=").append(status);
        sb.append(", machingStatus=").append(machingStatus);
        sb.append(", outFactoryStatus=").append(outFactoryStatus);
        sb.append(", productWriteStatus=").append(productWriteStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}